import request from "../util/request";

// 课程管理相关接口

// 查询课程列表
export const selectCourseList = function (params = {}) {
  return request({
    url: "/admin/course",
    method: "get",
    params: params,
  });
};

// 删除课程
export const deleteCourseById = function (params = {}) {
  return request({
    url: "/admin/course",
    method: "delete",
    params: params,
  });
};

// 添加新课程
export const insertNewCourse = function (params = {}) {
  return request({
    url: "/admin/course",
    method: "post",
    params: params,
  });
};

// 更新课程
export const updateCourseById = function (params = {}) {
  return request({
    url: "/admin/course",
    method: "put",
    params: params,
  });
};
